<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>radio单选框</title>
</head>

<body>
  <form action="" method="get">
    <h3>性别</h3>
    <!-- radio单选框，适用于只能有一个答案的场景 -->
    <input type="radio" name="sex" value="male" checked>男
    <input type="radio" name="sex" value="female">女
    <input type="submit" value="提交">
  </form>
</body>

</html>